package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputPattern;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.en.AccountType;
import com.hengpeng.itfinbase.en.SubAccountType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * <pre>
 * 资金账户信息表
 * </pre>
 * @author weiyuan
 * @version 1.0, 2015年5月27日
 */
@Entity
public class Account extends AbstractAssign18IdEntity
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -5967010697826188577L;

	/**
	 * 用户id:=UserInfo.id
	 */
	@HtmlInput(label = "用户ID", type = HtmlInputType.TEXT, nullable = true, index = 1)
	private Long userId;

	/**
	 * 用户姓名
	 */
	@Column(length = 50)
	@HtmlInput(label = "用户名", type = HtmlInputType.TEXT, nullable = true, index = 2)
	private String userName;

	/**
	 * 账号类型
	 */
	@Column(length = 20)
	@HtmlInput(label = "账号类型", type = HtmlInputType.TEXT, nullable = true, index = 3,labelProperty="text")
	@Enumerated(javax.persistence.EnumType.STRING)
	private AccountType accountType;

	/**
	 * 托管账号id
	 */
	@Column(length = 50)
	@HtmlInput(label = "托管账号id", type = HtmlInputType.TEXT, nullable = true, index = 4)
	private String trustAccountId;

	/**
	 * 子帐户类型
	 */
	@Column(length = 50)
	@HtmlInput(label = "子帐户类型", type = HtmlInputType.TEXT, nullable = true, index = 5,labelProperty="text")
	@Enumerated(javax.persistence.EnumType.STRING)
	private SubAccountType subAccountType;

	/**
	 * 子账户ID
	 */
	@HtmlInput(label = "子账户ID", type = HtmlInputType.TEXT, nullable = true, index = 6)
	private String subAccountId;

	/**
	 * 账户名称(主账户,费率账户,普通账户,储备金账户等)
	 */
	@HtmlInput(label = "账户名称", type = HtmlInputType.TEXT, nullable = true, index = 7)
	private String accountName;

	/**
	 * 当前账户资产余额(可用余额=baseMoney-freezeMoney)
	 */
	@HtmlInput(label = "账户余额", type = HtmlInputType.TEXT, nullable = true, index = 8)
	private Long baseMoney;

	/**
	 * 冻结资金金额
	 */
	@HtmlInput(label = "已冻结金额", type = HtmlInputType.TEXT, nullable = true, index = 9)
	private Long freezeMoney;

	/**
	 * 累计充值金额
	 */
	@HtmlInput(label = "累计充值额", type = HtmlInputType.TEXT, nullable = true, index = 10)
	private Long totalfillMoney;

	/**
	 * 累计提现金额
	 */
	@HtmlInput(label = "累计提现额", type = HtmlInputType.TEXT, nullable = true, index = 11)
	private Long totaldrawMoney;

	/**
	 * 累计投资金额
	 */
	@HtmlInput(label = "累计投资额", type = HtmlInputType.TEXT, nullable = true, index = 12)
	private Long totalInvestMoney;
	
	/**
	 * 累计投资笔数
	 */
	@HtmlInput(label = "累计投资笔数", type = HtmlInputType.TEXT, nullable = true, index = 12)
	private Long totalInvestNum;

	/**
	 * 累计收益金额
	 */
	@HtmlInput(label = "累计收益额", type = HtmlInputType.TEXT, nullable = true, index = 13)
	private Long totalIncomeMoney;

	/**
	 * 待收本金
	 */
	@HtmlInput(label = "待收本金", type = HtmlInputType.TEXT, nullable = true, index = 14)
	private Long baseMoneyCollect;

	/**
	 * 待收收益
	 */
	@HtmlInput(label = "待收收益", type = HtmlInputType.TEXT, nullable = true, index = 15)
	private Long inComeMoneyCollect;

	/**
	 * 待还本金
	 */
	@HtmlInput(label = "待还本金", type = HtmlInputType.TEXT, nullable = true, index = 16)
	private Long baseMoneyRepay;

	/**
	 * 待还利息
	 */
	@HtmlInput(label ="待还利息", type = HtmlInputType.TEXT, nullable = true, index = 17)
	private Long interestMoneyRepay;

	/**
	 * 更新时间
	 */
	@HtmlInput(label = "最后修改日期", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true,index = 18)
	private Date updateTime;

	/**
	 * 创建时间
	 */
	@HtmlInput(label = "创建时间", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true,index = 19)
	private Date createTime;

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public String getTrustAccountId()
	{
		return trustAccountId;
	}

	public void setTrustAccountId(String trustAccountId)
	{
		this.trustAccountId = trustAccountId;
	}

	public Long getBaseMoney()
	{
		return baseMoney;
	}

	public void setBaseMoney(Long baseMoney)
	{
		this.baseMoney = baseMoney;
	}

	public Long getFreezeMoney()
	{
		return freezeMoney;
	}

	public void setFreezeMoney(Long freezeMoney)
	{
		this.freezeMoney = freezeMoney;
	}

	public Long getTotalfillMoney()
	{
		return totalfillMoney;
	}

	public void setTotalfillMoney(Long totalfillMoney)
	{
		this.totalfillMoney = totalfillMoney;
	}

	public Long getTotaldrawMoney()
	{
		return totaldrawMoney;
	}

	public void setTotaldrawMoney(Long totaldrawMoney)
	{
		this.totaldrawMoney = totaldrawMoney;
	}

	public Long getTotalInvestMoney()
	{
		return totalInvestMoney;
	}

	public void setTotalInvestMoney(Long totalInvestMoney)
	{
		this.totalInvestMoney = totalInvestMoney;
	}

	public Long getTotalIncomeMoney()
	{
		return totalIncomeMoney;
	}

	public void setTotalIncomeMoney(Long totalIncomeMoney)
	{
		this.totalIncomeMoney = totalIncomeMoney;
	}

	public Long getBaseMoneyCollect()
	{
		return baseMoneyCollect;
	}

	public void setBaseMoneyCollect(Long baseMoneyCollect)
	{
		this.baseMoneyCollect = baseMoneyCollect;
	}

	public Long getInComeMoneyCollect()
	{
		return inComeMoneyCollect;
	}

	public void setInComeMoneyCollect(Long inComeMoneyCollect)
	{
		this.inComeMoneyCollect = inComeMoneyCollect;
	}

	public Long getBaseMoneyRepay()
	{
		return baseMoneyRepay;
	}

	public void setBaseMoneyRepay(Long baseMoneyRepay)
	{
		this.baseMoneyRepay = baseMoneyRepay;
	}

	public Long getInterestMoneyRepay()
	{
		return interestMoneyRepay;
	}

	public void setInterestMoneyRepay(Long interestMoneyRepay)
	{
		this.interestMoneyRepay = interestMoneyRepay;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Long getUserId()
	{
		return userId;
	}

	public void setUserId(Long userId)
	{
		this.userId = userId;
	}

	public SubAccountType getSubAccountType()
	{
		return subAccountType;
	}

	public void setSubAccountType(SubAccountType subAccountType)
	{
		this.subAccountType = subAccountType;
	}

	public String getSubAccountId()
	{
		return subAccountId;
	}

	public void setSubAccountId(String subAccountId)
	{
		this.subAccountId = subAccountId;
	}

	public AccountType getAccountType()
	{
		return accountType;
	}

	public void setAccountType(AccountType accountType)
	{
		this.accountType = accountType;
	}

	public String getAccountName()
	{
		return accountName;
	}

	public void setAccountName(String accountName)
	{
		this.accountName = accountName;
	}

	public Long getTotalInvestNum()
	{
		return totalInvestNum;
	}

	public void setTotalInvestNum(Long totalInvestNum)
	{
		this.totalInvestNum = totalInvestNum;
	}

}
